package com.njtoyo.taxi.admin.mapper.master.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.library.Const;
import com.njtoyo.taxi.admin.mapper.master.entity.ElderlyDeviceManage;
import com.njtoyo.taxi.admin.rest.pojo.dto.ElderlyDeviceAddDto;
import com.njtoyo.taxi.admin.rest.pojo.dto.ElderlyDeviceFunctionUpdateDto;
import com.njtoyo.taxi.admin.rest.presenter.ElderlyDeviceCallCardNumPresenter;
import com.njtoyo.taxi.admin.rest.presenter.business.ElderlyDeviceManagePresenter;
import com.njtoyo.taxi.admin.rest.presenter.business.advertise.AdvertisePagePresenter;
import com.njtoyo.taxi.admin.rest.wrapper.business.advertise.AdvertiseWrapper;
import com.njtoyo.taxi.admin.rest.wrapper.business.device.ElderlyDeviceExportWrapper;
import com.njtoyo.taxi.admin.rest.wrapper.business.device.ElderlyDeviceQueryWrapper;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
@DS(Const.PRIMARY_DS)
public interface ElderlyDeviceManageMapper extends BaseMapper<ElderlyDeviceManage> {

    void updateElderlyDevice(ElderlyDeviceAddDto dto);

    void updateElderlyDeviceFunction(ElderlyDeviceFunctionUpdateDto dto);

    Page<ElderlyDeviceManagePresenter> queryAll(ElderlyDeviceQueryWrapper wrapper);

    Integer queryCountCall(String deviceSerialNumber);

    Integer queryCountCallRidePick(String deviceSerialNumber);

    List<ElderlyDeviceCallCardNumPresenter> getCallCardNum(String deviceSerialNumber);

    List<ElderlyDeviceManagePresenter> queryAllElderlyDevice(ElderlyDeviceExportWrapper wrapper);

    ElderlyDeviceCallCardNumPresenter getAllDeviceCallNum();

    List<ElderlyDeviceManagePresenter> queryAllElderlyDeviceByCantonId(Integer cantonId);
}
